/*
 * @Author: wurangkun
 * @Date: 2024-05-21 10:41:31
 * @LastEditTime: 2024-05-21 10:44:46
 * @LastEditors: wurangkun
 * @FilePath: \flutter_example\lib\states\ProfileChangeNotifier.dart
 * @Description: 
 */
import 'package:flutter/material.dart';
import 'package:flutter_example/common/global.dart';
import 'package:flutter_example/models/index.dart';

class ProfileChangeNotifier extends ChangeNotifier {
  // 获取用户信息
  Profile get profile => Global.profile;

  @override
  void notifyListeners() {
    Global.saveProfile(); //保存Profile变更
    super.notifyListeners(); //通知依赖的Widget更新
  }
}
